DISCUSSION
The
ATSUDisposeTextLayout function only frees memory associated with the text layout object and its internal structures. This includes text layout attributes, style runs, and soft line breaks.
ATSUDisposeTextLayout does not dispose of the memory pointed to by reference constants. You are responsible for doing so.